package com.roger.myHome.service.impl;

import com.roger.myHome.entity.qto.TotalExpenseQry;
import com.roger.myHome.entity.vo.TotalExpenseVo;
import com.roger.myHome.mapper.TotalExpenseMapper;
import com.roger.myHome.page.EUDataGridResult;
import com.roger.myHome.service.TotalExpenseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@Slf4j
public class TotalExpenseServiceImpl implements TotalExpenseService {

    @Resource
    private TotalExpenseMapper totalExpenseMapper;

    @Override
    public EUDataGridResult page(TotalExpenseQry qryReq) {
        List<TotalExpenseVo> list = totalExpenseMapper.page(qryReq);

        return new EUDataGridResult(list, totalExpenseMapper.totalSize(qryReq));
    }
}
